package com.yifeng.repo.tookit.oss.service;

import com.yifeng.repo.tookit.oss.model.OssObject;
import com.yifeng.repo.tookit.oss.model.Signature;
import feign.Param;
import feign.RequestLine;

import java.util.List;

/**
 * 文件服务
 */
public interface FileFeign {

    @RequestLine("POST /oss/fileservice/apply")
    Signature apply(@Param("appId") String appId, @Param("path") String path);

    @RequestLine("POST /oss/fileservice/apply")
    Signature apply(@Param("merchantId") String merchantId, @Param("appId") String appId, @Param("path") String path);

    @RequestLine("POST /oss/fileservice/applySpecialPermit")
    Signature applySpecialPermit(@Param("type") String type, @Param("path") String path);

    @RequestLine("POST /oss/fileservice/list")
    List<OssObject> list(@Param("merchantId") String merchantId, @Param("appId") String appId, @Param("path") String path);

    @RequestLine("POST /oss/fileservice/delete")
    void delete(@Param("merchantId") String merchantId, @Param("appId") String appId, @Param("path") String path);
}